package chixing.day20.work2;

import java.time.LocalDateTime;

public class Test2 {
    public static void main(String[] args) {
        Manage system = new Manage();

        // 系统初始化商品列表
        Product phone = new Product(1, "手机", 999.0, 10.0);
        system.addProduct(phone);

        // 设置限时抢购活动
        FlashSale flashSale = new FlashSale(1, 0.8,
                LocalDateTime.now().minusHours(1),
                LocalDateTime.now().plusHours(1));
        system.addFlashSale(flashSale);

        // 用户下单
        system.placeOrder(1, 6);
    }
}

